package com.zhongan.usercenter.controller;

import com.zhongan.common.dto.ResultBase;
import com.zhongan.usercenter.proxy.CloudUserProxy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class UserController {

    @Autowired
    CloudUserProxy cloudUserProxy;

    @RequestMapping(value = "/add", method = RequestMethod.GET)
    public ResultBase<Integer> add(Integer a, Integer b, HttpServletRequest httpServletRequest) {
        try {
            String s = ResourceUtils.getURL("classpath:application.properties").getPath();
            System.out.println(s);
        }catch (Exception e){
            e.printStackTrace();
        }
        return cloudUserProxy.add(10, 20);
    }

}